package tako.wisers.com.android.upload;

import java.io.Serializable;

import javax.jdo.PersistenceManager;

public abstract class EntityBase implements Serializable{
	
	private static final long serialVersionUID = 1L;

	public abstract void update(PersistenceManager pm);
	/**
	 * Do not close PersistenceManager without only one data
	 */
	public abstract void insert(PersistenceManager pm,String line,Integer times);
	
	public static long getHashcode(String query) {
		String reverse = (new StringBuffer(query)).reverse().toString();
		long hashcode = reverse.hashCode();
		hashcode = hashcode << 32;
		hashcode = hashcode + query.hashCode();
		return hashcode;
	}
	
}
